<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
    <title>v-model 实例!</title>
</head>

<body>
    <h1>v-model 实例!</h1>
    <hr>
    <div id="app">
            <p>原始文本信息：{{message}}空格</p>
            <h3>文本框</h3>
            <p>v-model:<input type="text" v-model="message"></p>
            <p>v-model.lazy:<input type="text" v-model.lazy="message"></p>
            <p>v-model.number:<input type="text" v-model.number="message"></p>
            <!--trim去空格-->
            <p>v-model.trim:<input type="text" v-model.trim="message"></p>
            <hr>
            <h3>文本域</h3>
            <textarea name="" id="" cols="30" rows="10" v-model="message"></textarea>
            <hr>
            <h3>多选框绑定一个值</h3>
            <input type="checkbox" id="isTrue" v-model="isTrue">
            <label for="isTrue">{{isTrue}}</label>
            <hr>
            <h3>多选绑定一个数组</h3>
            <p>
                <input type="checkbox" id="JSPang" value="JSPang" v-model="web_Names">
                <label for="JSPang">JSPang</label>
                <input type="checkbox" id="Panda" value="Panda" v-model="web_Names">
                <label for="Panda">Panda</label>
                <input type="checkbox" id="PanPan" value="PanPan" v-model="web_Names">
                <label for="PanPan">PanPan</label>
                <p>{{web_Names}}</p>
            </p>
            <h3>单选绑定一个数组</h3>
            <p>
            <h3>单选按钮绑定</h3>
            <input type="radio" id="one" value="男" v-model="sex">
            <label for="one">男</label>
            <input type="radio" id="two" value="女" v-model="sex">
            <label for="one">女</label>
            <p>{{sex}}</p>
            </p>
        </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                message:"hello link", 
                isTrue:true,
                web_Names:[],
                sex:'男',
            }
        })
    </script>
</body>

</html>